<?php
/**
 * Here all global framework wide constants are defined.
 *
 * @author     Ulf Kadner <ulfikado@gmail.com>
 * @category   Beluga PHP5.3+ Framework
 * @copyright  (c) 2015, Ulfikado
 * @package    BF\Core
 * @since      2015-01-17 10:40
 * @version    0.1
 */

namespace
{

   /**
    * Defines if the currently underlying system is a Windows OS.
    *
    * @since  v0.1
    */
   \define( 'IS_WIN', 'WIN' === \strtoupper( \substr( \PHP_OS, 0, 3 ) ) );

   /**
    * This constant defines if the INTL PHP extension is enabled/usable.
    *
    * @since  v0.1
    */
   \define( 'MOD_INTL', \extension_loaded( 'intl' ) );

   /**
    * Is the PECL Imagick Extension loaded?
    *
    * @since  v0.1
    */
   \define( 'MOD_IMAGICK', \class_exists('\\Imagick') );

   /**
    * Is the MCrypt extension is loaded?
    *
    * @since  v0.1
    */
   \define( 'MOD_MCRYPT', \defined( 'MCRYPT_RAND' ) );

   /**
    * This is the main Beluga Framework folder that contains the bootstrap file (bf.bootstrap.php).
    */
   \define( 'BF_FOLDER', \dirname( __DIR__ ) );

   /**
    * Use Input data from a custom source, in some validation cases.
    */
   \define( 'INPUT_CUSTOM', 999 );

   /**
    * $type attribute of {@see \BF\escape()} to convert &lt;&gt;&amp; to the HTML entities.
    */
   \define( 'ESCAPE_HTML', 'html' );

   /**
    * $type attribute of {@see \BF\escape()} to convert &lt;&gt;&amp;"' to the HTML entities.
    */
   \define( 'ESCAPE_HTML_ALL', 'htmlall' );

   /**
    * $type attribute of {@see \BF\escape()} to urlencode.
    */
   \define( 'ESCAPE_URL', 'url' );

   /**
    * $type attribute of {@see \BF\escape()} to convert a PHP value to some JSON code.
    */
   \define( 'ESCAPE_JSON', 'json' );

}

namespace BF
{

   /**
    * This are the default CRLF linebreak characters.
    */
   const CRLF = "\r\n";

   /**
    * This is the main Beluga Framework folder that contains the bootstrap file (bf.bootstrap.php).
    */
   const FOLDER = \BF_FOLDER;

}

